#include "Thread.h"
#include <functional>
#include <iostream>

using namespace std;

int f(int i, void* ptr){
	char c = *((char *)ptr+1);
	cout << "the int: " << i << " the char: " << c << endl;
	return 0;
}

int f2(int i){
	cout << "f2 i:" << i << endl;
	return 99;
}

int main(int argc, char **argv){
	char *msg = "abcdefg";
	auto ff = bind(f, placeholders::_1, placeholders::_2);
	int x = ff(7, msg);
	cout << "-----x: ------" << x << endl;
	
	Thread *th = new Thread(bind(f2,placeholders::_1));
	th->start();

	return 0;
}

